package com.genntii.examManager.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.genntii.examManager.common.result.PageResult;
import com.genntii.examManager.domain.dto.CourseDTO;
import com.genntii.examManager.domain.dto.CourseUpdateDTO;
import com.genntii.examManager.domain.entity.Course;
import com.genntii.examManager.domain.vo.CourseDetailVO;
import com.genntii.examManager.domain.vo.CourseVO;

public interface CourseService extends IService<Course> {

    PageResult<CourseVO> getCourseVOList(Integer pageNum, Integer pageSize, Long userId);

    PageResult<CourseVO> selectCourseVOList(String keyword, Integer pageNum, Integer pageSize, Long userId);

    CourseDetailVO getCourseDetailById(Long courseId, Long userId);

    PageResult<CourseVO> getLatestCourseList(Integer pageNum, Integer pageSize, Long userId);

    /**
     * 教师获取自己的课程列表
     *
     * @param pageNum
     * @param pageSize
     * @param userId
     * @return 课程列表
     */
    PageResult<CourseVO> getCourseListByTeacher(Integer pageNum, Integer pageSize, Long userId);

    void addCourse(Long userId, CourseDTO courseDTO);

    void updateCourse(Long userId, CourseUpdateDTO courseUpdateDTO);

    PageResult<CourseVO> getCourseListUserPartIn(Integer pageNum, Integer pageSize, Long userId);
}
